<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">

  <xi:include href="master.html" />

<head>
  <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
  <title>Noodle NG</title>
  <link rel="stylesheet" type="text/css" href="${tg.url('/css/index.css')}" />
  
  <style type="text/css">
	div#post {
		width: 600px;
		margin-right: auto;
		margin-left: auto;
		clear: both;
		padding: 10px;
	}
	
	div#date {
		float: right;
		font-size: x-small;
		margin: 5px;
	}
	
	div#text {
		text-align: justify;
	}
	
	div#author {
		font-size: large;
	}
	
	
	form#submit_post {
		margin-left: auto;
		margin-right: auto;
		width: 250px;
	}
  </style>
</head>

<body>

<div>
    <form id="submit_post" method="post" action="/pinboard" name="submit_post">
    	Autor:<input id="author_input" maxlength="32" size="16" name="author" />
    	<br />
        <textarea id="text_input" rows="10" cols="30" name="text" />
        <br />
        <input type="submit" value="abschicken" />
    </form>
</div>

<div id="posts">
	<div id="post" py:for="post in posts">
		<div id="author">${post.author}</div>
		<div id="date">${post.date.strftime('%H:%M %d.%m.%Y')}</div>
		<div id="text">${post.escaped_text}</div>
	</div>
</div>

<center>
	<a py:if="offset >= length" href="${tg.url('pinboard?offset=' + str(offset - length) )}">&lt; vorherige Seite</a>
	<a py:if="len(posts) >= length" href="${tg.url('pinboard?offset=' + str(offset + length) )}">nächste Seite &gt;</a>
</center>

</body>
</html>

